package roborally;

import static org.junit.Assert.*;
import IRobot;

import org.junit.Test;

import roborally.Robot;

public class RobotTest {

	private Robot robot;
	private long x;
	private long y;
	private int orientation;
	private double energy;

	public void setUp() {
		robot = new Robot(x, y, orientation, energy);
	}

	?????
	@SuppressWarnings("deprecation")
	@Test
	public double testGetEnergyAmount(){
		double robotEnergy = robot.getEnergyAmount();
		assertNotNull(robotEnergy);
		assertEquals(500, robotEnergy, 0);
	}	

	@Test
	public boolean testIsValidEnergyAmount(){
		double validRobotEnergy = 500;
		double invalidRobotEnergy = -5;
		assertEquals(false, robot.isValidEnergyAmount(invalidRobotEnergy));
		assertEquals(true, robot.isValidEnergyAmount(invalidRobotEnergy));
	}

	@Test
	public double testGetFractionAmount(){
		HOEDOEIKDIT?
		//return (this.energyAmount / MAX_AMOUNT_OF_ENERGY) * 100;
	}

	???
	@SuppressWarnings("deprecation")
	@Test
	public void testRecharge(){
		int invalidAmountToAdd = -5;
		int validAmountToAdd = 500;
		assertEquals(invalidAmountToAdd, robot.getEnergyAmount(), 0);
		assertEquals(validAmountToAdd, robot.getEnergyAmount(), 0);
	}
	
	@Test
	public void testTurnQuarter(){
		Turning directionLeft = Turning.Left;
		Turning directionRight = Turning.Right;
		int originalOrientation = 1;
		assertEquals(0, robot.getOrientation(robot.turnQuarter(directionLeft)));
		assertEquals(2, robot.getOrientation(robot.turnQuarter(directionRight)));
	}

	@Test
	public void testMove(){
		robot = new Robot(0, 0, 2, 500);
		robot.move();
		assertEquals(0, robot.getXCoord());
		assertEquals(1, robot.getYCoord());
		assertEquals(2, robot.getOrientation());
		assertEquals(0, robot.getEnergyAmount(), 0.1);
	}
	
	@Test 
	public double testGetAmountNeededToReach(){
		//par:long XCoordDesPosition, long YCoordDesPosition
		JOSI STUURT DIT NOG DOOR :)
	}

		
	
}



